<?php
/******************************************************
v4 - Management Framework
Copyright (C) 2008  Gary Taylor, gMerc Incorporation
http://www.gmerc.com/v4/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

gary@gmerc.com
******************************************************/
class logout {
  function loaddata() {
    global $masterclass;

    if ($masterclass->mainconfig['include_authentication']=='1') {
      $logout_func=$masterclass->site['authentication_type'].'removetoken';
      if (is_callable(array($this->allclasses['authentication'], $logout_func))) { $this->allclasses['authentication']->$logout_func(); } else { session_destroy(); }
    }
    
  return;
  }

  function display() {
    global $masterclass;
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" height="100%"><tr valign="middle"><td align="center" style="text-align:center;">You are Logged Out<br><br><input type="button" class="button"value=" Click Here To Login " OnClick="window.location='<?php echo $masterclass->mainconfig['dir']; ?>';"><br><br><input type="button" class="button" value=" Close Window " OnClick="window.close();"></td></tr></table>
<?php
  return;
  }
}
?>